import {API_INTERFACE_LIST} from "@/constant/api";
import {Interface} from "~/entity/interface";
import {Page} from "~/entity/page";

export default new class api {

    /**
     * 获取接口列表
     */
    getList = (api: Interface, page: Page) => {
        return useUtils().HttpUtils.get(API_INTERFACE_LIST, {
            ...api,
            ...page
        });
    }

    /**
     * 获取接口详情
     */
    getInterface = (id: string) => {
        return useUtils().HttpUtils.get(API_INTERFACE_LIST + "/" + id);
    }

};